<html xmlns:th="http://www.thymeleaf.org">


<body class="fixed-nav sticky-footer bg-dark" id="page-top" th:fragment="common-nav">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
    <a class="navbar-brand" href="index.html">网上商城后台管理系统</a>
    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarResponsive">
        <ul class="navbar-nav navbar-sidenav" id="exampleAccordion">
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="订单管理" th:if="${session.order==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseOrders" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-dashboard"></i>
                    <span class="nav-link-text">订单管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseOrders">
                    <li>
                        <a href="/fashionpress/order/list">订单列表</a>
                    </li>

                </ul>
            </li>
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="用户管理" th:if="${session.admin==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseAdmin" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-area-chart"></i>
                    <span class="nav-link-text">用户管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseAdmin">
                    <li>
                        <a href="/fashionpress/admin/list">管理员列表</a>
                    </li>
                    <li>
                        <a href="/fashionpress/admin/add">添加管理员</a>
                    </li>
                </ul>
            </li>
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="角色管理" th:if="${session.nick==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseNick" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-table"></i>
                    <span class="nav-link-text">角色管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseNick">
                    <li>
                        <a href="/fashionpress/nick/list">角色列表</a>
                    </li>
                    <li>
                        <a href="/fashionpress/nick/add">添加角色</a>
                    </li>
                </ul>
            </li>
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="类别管理" th:if="${session.category==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseComponents" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-wrench"></i>
                    <span class="nav-link-text">类别管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseComponents">
                    <li>
                        <a href="/fashionpress/category/list">类别列表</a>
                    </li>
                    <li>
                        <a href="/fashionpress/category/addpage">添加类别</a>
                    </li>
                </ul>
            </li>
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="商品管理" th:if="${session.product==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseProduct" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-file"></i>
                    <span class="nav-link-text">商品管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseProduct">
                    <li>
                        <a href="/fashionpress/product/list">商品列表</a>
                    </li>
                    <li>
                        <a href="/fashionpress/product/add">添加商品</a>
                    </li>

                </ul>
            </li>
            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="商品图片管理" th:if="${session.img==1}">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseProductImg" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-sitemap"></i>
                    <span class="nav-link-text">商品图片管理</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseProductImg">
                    <li>
                        <a href="/fashionpress/img/list">图片列表</a>
                    </li>
                    <!--<li>-->
                        <!--<a href="/fashionpress/img/add">添加商品图片</a>-->
                    <!--</li>-->

                </ul>
            </li>
        </ul>
        <ul class="navbar-nav sidenav-toggler">
            <li class="nav-item">
                <a class="nav-link text-center" id="sidenavToggler">
                    <i class="fa fa-fw fa-angle-left"></i>
                </a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li>
                <a class="btn btn-primary" href="#" id="toggleNavColor">切换菜单颜色</a>
            </li>
            <li class="nav-item dropdown" style="width: 150px;padding-left: 10px;padding-right: 10px">
               <strong style="width: 150px;"> <span th:text="${session.administrator.adminUsername}" style="width: 150px;align-items: center;font-size: 24px"></span></strong>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-toggle="modal" data-target="#exampleModal">
                    <i class="fa fa-fw fa-sign-out"></i>Logout</a>
            </li>
        </ul>
    </div>
</nav>
<!-- Scroll to Top Button-->
    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fa fa-angle-up"></i>
    </a>
    <!-- Logout Modal-->
    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
                    <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
                <div class="modal-footer">
                    <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
                    <a class="btn btn-primary" href="/fashionpress/admin/logout">Logout</a>
                </div>
            </div>
        </div>
    </div>
    <!-- Bootstrap core JavaScript-->
    <script src="/fashionpress/admin/vendor/jquery/jquery.min.js"></script>
    <script src="/fashionpress/admin/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- Core plugin JavaScript-->
    <script src="/fashionpress/admin/vendor/jquery-easing/jquery.easing.min.js"></script>
    <!-- Custom scripts for all pages-->
    <script src="/fashionpress/admin/js/sb-admin.min.js"></script>
    <!-- Custom scripts for this page-->
    <!-- Toggle between fixed and static navbar-->
    <script>
        $('#toggleNavPosition').click(function() {
            $('body').toggleClass('fixed-nav');
            $('nav').toggleClass('fixed-top static-top');
        });

    </script>
    <!-- Toggle between dark and light navbar-->
    <script>
        $('#toggleNavColor').click(function() {
            $('nav').toggleClass('navbar-dark navbar-light');
            $('nav').toggleClass('bg-dark bg-light');
            $('body').toggleClass('bg-dark bg-light');
        });

    </script>
</div>
</body>

</html>
